hackerrank java stdin and stdout ii problem

visit shbcf.ru